package com.sys.gradepaysys.mapper;

import com.sys.gradepaysys.model.Event;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.security.access.method.P;

import java.util.List;
import java.util.Map;

public interface EventMapper {
    Integer save(Event event);
    @Select("select * from event where is_doing =1")
    List<Event> selectEventIsDoingList();

    List<Event> selectEventByCondition(Event event);

    Integer update(Event event);

    @Select("select * from s_stu_e where sid=#{sid} and eid=#{eid}")
    List<Map<String, String>> selectStueList(@Param("sid") Integer sid, @Param("eid") Integer eid);

    Integer saveStue(@Param("sid") Integer sid, @Param("eid") Integer eid);

    Integer saveSpay(@Param("sid") String sid, @Param("eid") String eid, @Param("pay") String pay, @Param("pdate") String pdate);
    @Select("select inid,in_name,in_money, DATE_FORMAT(in_date,'%Y-%m-%d %H:%i:%s') in_date,cid from income")
    List<Map<String, String>>getIncomeList();
    
    @Select("select pay_id,pay_name,pay_money,  DATE_FORMAT(pay_date,'%Y-%m-%d %H:%i:%s') pay_date,cid from payout")
    List<Map<String, String>>getOutEventList();

    
    List<Map<String, String>>selectEventInfoStuList(String eid);

    List<Map<String, String>>selectEventStu(String eid);


}
